package com.nitobi.harvest.model
{
	import com.nitobi.harvest.service.HarvestService;
	import com.nitobi.harvest.vo.ProjectVO;
	
	import mx.collections.ArrayCollection;
	
	public class HarvestModel
	{
		private static var instance:HarvestModel;
		
		private var _projectListAC:ArrayCollection = new ArrayCollection();
		private var _dailyEntriesAC:ArrayCollection = new ArrayCollection();
		private var _todaysHours:Number = new Number();

		[Bindable]
		public function set todaysHours(value:Number):void
		{
			_todaysHours = value;
		}
		
		public function get todaysHours():Number
		{
			return _todaysHours;
		}
				
		[Bindable]
		public function set projectListAC(value:ArrayCollection):void
		{
			_projectListAC = value;
		}
		
		public function get projectListAC():ArrayCollection
		{
			return _projectListAC;
		}
		
		[Bindable]
		public function set dailyEntriesAC(value:ArrayCollection):void
		{
			_dailyEntriesAC = value;
		}
		
		public function get dailyEntriesAC():ArrayCollection
		{
			return _dailyEntriesAC;
		}
		
		public function HarvestModel()
		{
			if( HarvestModel.instance != null ) 
			{
				throw new Error( "HarvestModel is a singleton." );
			}
		}
		
		public static function getInstance():HarvestModel
		{
			if( HarvestModel.instance == null ) 
			{
				HarvestModel.instance = new HarvestModel();
				
			}
			return HarvestModel.instance;
		}	
	}
}